
import { Column, Table } from 'sequelize-typescript';
import { BaseModel } from '@/model'
import { DataTypes } from "sequelize";

@Table
export class DbDataSource extends BaseModel {
  @Column({ type: DataTypes.STRING, primaryKey: true, allowNull: false, comment: "编码" })
  connCode: string;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: '服务器名称' })
  serverName: string;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: "数据库名称" })
  dbName: string;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: "名称" })
  connName: string;

  @Column({ type: DataTypes.STRING, allowNull: false, comment: "用户名" })
  userCode: string;

  @Column({ type: DataTypes.STRING, comment: "密码" })
  password: string;

  @Column({ type: DataTypes.INTEGER, allowNull: false, comment: "数据库类型" })
  dbType: number;

  @Column({ type: DataTypes.INTEGER, allowNull: false, comment: "连接方式" })
  connType: number;

  @Column({ type: DataTypes.INTEGER, allowNull: false, comment: "端口号" })
  accessNo: number;

  @Column({ type: DataTypes.INTEGER, comment: "加密方式" })
  pwdType: number;

}
